<%@page import="debugs.OrderDebug"%>
<%@page import="java.util.Locale"%>
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="java.util.List"%>
<%@page import="search.OrderSearchData"%>
<%@page import="java.text.NumberFormat"%>
<%@page import="models.OrderModel"%>
<%@page import="java.util.ArrayList"%>
<%
	OrderSearchData orderSearch = (OrderSearchData) request.getAttribute("orderSearch");	
	NumberFormat nf = NumberFormat.getNumberInstance(Locale.GERMAN);
%>
	
<table style="width: 2000px;">
	<caption>List Result</caption>
	<tr>
		<th>Stt</th>
		<th>Order Date</th>
		<th>Id</th>
	    <th>Deal Id</th>
	    <th>Deal Name</th>
	    <th>Product Type</th>
	    <th>Delivered</th>	    
	    <th>From Email</th>	    
	    <th>Old Status</th>
	    <th>Payment Type</th>
	    <th>Quantity</th>
	    <th>Sale Name</th>
	    <th>Ship Type</th>
	    <th>Status</th>
	    <th>Total Price</th>
	    <th>Unit Price</th>
	    <th>User name</th>
	    <th>Check Out Time</th>
	    <th>List Order Product</th>
	    
	</tr>	  	
<%
	int count = 0;
	for(OrderModel order : orderSearch.getListResult()){		
		count++;
		%>	
	<tr>
		<td align="center"><%=count %></td>
		<td align="center"><%=order.getOrderDate() %></td>		
		<td align="center"><%=order.getOrderId() %></td>	
		<td align="center"><%=order.getDealId() %></td>
		<td align="center"><%=order.getDealShortName() %></td>		
		<td align="center"><%=order.getDealProductType() %></td>		
		<td align="center"><%=order.getDelivered() %></td>
		<td align="center"><%=order.getFromEmail() %></td>				
		<td align="center"><%=order.getOldStatus() %></td>			
		<td align="center"><%=order.getPaymentType() %></td>
		<td align="center"><%=order.getQuantity() %></td>		
		<td align="center"><%=order.getSalername() %></td>
		<td align="center"><%=order.getShipType() %></td>
		<td align="center"><%=order.getStatus() %></td>
		<td align="center"><%=nf.format(order.getTotalPrice()) %></td>
		<td align="center"><%=nf.format(order.getUnitPrice()) %></td>
		<td align="center"><%=order.getUsername() %></td>
		<td align="center"><%=order.getCheckOutTime() %></td>
		<td align="center"><%=order.getListOrderProduct() %></td>
		
	</tr>						
		<%
	}
%>
</table>